/*
 * @description: 环境域名配置
 * @fileName: index.js
 * @author: DangPeng
 * @date: 2023-12-19 17:08:47
 */

const environment = {
  // 接口请求域名配置
  api: function () {
    let curVersion = uni.getAccountInfoSync().miniProgram.envVersion;
    switch (curVersion) {
      case "develop": // 开发版
        return "https://api.vvhan.com/api/";
      case "trial": // 体验版
        return "https://api.vvhan.com/api/";
      case "release": // 正式版
        return "http://xxx.xxx.xxx.xxx:xxx";
      default: // 其他,默认调用正式版
        return "https://api.vvhan.com/api/";
    }
  },
};

module.exports = {
  ...environment,
};
